﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Elderos.Highlight.Search;

namespace Elderos.Highlight
{
    public class ArrayResult : RuleResult
    {
        private readonly double[] _values;

        public ArrayResult(string[] rulenames, IEnumerable<double> values) : base(rulenames)
        {
            _values = values.ToArray();
        }

        public override IEnumerable<FactorValue> GetFactorValues()
        {
            return _values
                .Select((x, i) => new FactorValue(RuleNames[i], x))
                .ToArray();
        }
    }
}
